import request from '@/utils/request'

export function page (data) {
  return request({
    url: '/exam/page',
    method: 'post',
    data
  })
}
export function save (data) {
  return request({
    url: '/exam/create',
    method: 'post',
    data
  })
}

export function myExams () {
  return request({
    url: '/exam/myExams',
    method: 'post'
  })
}
export function fetchDetail (id) {
  return request({
    url: `/exam/preview/${id}`,
    method: 'get'
  })
}
